package cn.com.waajyun.shanbayscan.dto;

import java.util.List;

public class ArticlesDto {
    private AuthorDto author;
    private List<ArticleDto> articles;
    private Integer articlesTotal;

    public AuthorDto getAuthor() {
        return author;
    }

    public void setAuthor(AuthorDto author) {
        this.author = author;
    }

    public List<ArticleDto> getArticles() {
        return articles;
    }

    public void setArticles(List<ArticleDto> articles) {
        this.articles = articles;
    }

    public Integer getArticlesTotal() {
        if(articles != null)
            setArticlesTotal(articles.size());
        return articlesTotal;
    }

    public void setArticlesTotal(Integer articlesTotal) {
        this.articlesTotal = articlesTotal;
    }
}
